using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;

namespace LF.Domain.Entities
{
    [Table(Name = "SysMenu")]
    public class Menu : BaseEntity
    {
        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 菜单编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public Guid? ParentId { get; set; }

        /// <summary>
        /// 菜单类型(1:菜单 2:按钮)
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 路由地址
        /// </summary>
        public string Path { get; set; }

        /// <summary>
        /// 组件路径
        /// </summary>
        public string Component { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string Permission { get; set; }
        /// <summary>
        /// 是否是外链(0:否 1:是)
        /// </summary>
        public bool IsExt { get; set; }
        /// <summary>
        /// 外链打开方式
        /// </summary>
        public int ExtOpenMode { get; set; }
        /// <summary>
        /// 高亮菜单
        /// </summary>
        public string ActiveMenu {  get; set; }

        public string Redirect {  get; set; }
        /// <summary>
        /// 是否显示
        /// </summary>
        public int Show { get; set; }
        /// <summary>
        /// 是否开启页面缓存
        /// </summary>
        public int KeepAlive { get; set; }
        
        /// <summary>
        /// 菜单图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int OrderNo { get; set; }

        /// <summary>
        /// 状态(0:禁用 1:启用)
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 子菜单
        /// </summary>
        public List<Menu> Children { get; set; } = new List<Menu>();
    }
} 